package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName: OrderDetailMapper
 * @Package: com.sky.mapper
 * @Author: 金磊
 * @CreateDate: 2025/4/17 - 16:48
 * @Version: V1.0.0
 * @Description:
 */
@Mapper
public interface OrderDetailMapper {
    /**
     * 插入订单明细数据
     * @param orderDetailList
     */
    void insertBatch(List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单明细
     * @param orderId
     * @return
     */
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);
}
